package com.server.llh.llhserverwork.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;


import com.llh.llhsuppliers.R;
import com.server.llh.llhserverwork.activity.food.SubFoodOrderInfoActivity;
import com.server.llh.llhserverwork.adapter.base.ViewHolderBase;
import com.server.llh.llhserverwork.bean.ProductBean;
import com.server.llh.llhserverwork.port.HolderOnclickInterface;
import com.squareup.picasso.Picasso;

import butterknife.BindView;

/**
 * Created by ZTF on 2017-06-14.
 */

public class ShopFoodOrderInfo extends ViewHolderBase<ProductBean> {

    ImageView imgListItem;
    TextView textListItem;
    private Context mContext;

    public ShopFoodOrderInfo(SubFoodOrderInfoActivity context) {
        this.mContext = context;
    }
    @Override
    public View createView(LayoutInflater layoutInflater) {
        View v = LayoutInflater.from(mContext).inflate(R.layout.horizontal_list_item, null);
        imgListItem= (ImageView) v.findViewById(R.id.img_list_item);
        textListItem= (TextView) v.findViewById(R.id.text_list_item);
        return v;
    }

    @Override
    public void showData(int position, ProductBean itemData) {
        Picasso.with(mContext).load("http://i.imgur.com/DvpvklR.png").into(imgListItem);
        textListItem.setText(itemData.getProName());
    }

    @Override
    public void showData(int position, ProductBean itemData, HolderOnclickInterface holderOnclickInterface) {

    }
}
